package org.foj.service.impl;

import org.appfuse.service.impl.GenericManagerImpl;
import org.foj.dao.IssueDao;
import org.foj.model.Issue;
import org.foj.service.IssueManager;

import javax.jws.WebService;
import java.util.List;

/**
 * @author jeremy anderson
 */
@WebService(serviceName = "IssueService", endpointInterface = "org.foj.service.IssueManager")
public class IssueManagerImpl extends GenericManagerImpl<Issue, Long> implements IssueManager {

    private IssueDao issueDao;

    public IssueManagerImpl(IssueDao issueDao) {
        super(issueDao);
        this.issueDao = issueDao;
    }

    public List<Issue> listIssuesByCriteria(String projectName, String issueType, String severity, String status) {
        return issueDao.findByCriteria(projectName, issueType, severity, status);
    }
}
